Optimal. Leaf size=100 \[ \frac {c^2}{2 d^2 (b c-a d) (c+d x)^2}-\frac {c (b c-2 a d)}{d^2 (b c-a d)^2 (c+d x)}+\frac {a^2 \log (a+b x)}{(b c-a d)^3}-\frac {a^2 \log (c+d x)}{(b c-a d)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {90}
\begin {gather*} \frac {a^2 \log (a+b x)}{(b c-a d)^3}-\frac {a^2 \log (c+d x)}{(b c-a d)^3}+\frac {c^2}{2 d^2 (c+d x)^2 (b c-a d)}-\frac {c (b c-2 a d)}{d^2 (c+d x) (b c-a d)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rubi steps
\begin {align*} \int \frac {x^2}{(a+b x) (c+d x)^3} \, dx &=\int \left (\frac {a^2 b}{(b c-a d)^3 (a+b x)}+\frac {c^2}{d (-b c+a d) (c+d x)^3}+\frac {c (b c-2 a d)}{d (-b c+a d)^2 (c+d x)^2}+\frac {a^2 d}{(-b c+a d)^3 (c+d x)}\right ) \, dx\\ &=\frac {c^2}{2 d^2 (b c-a d) (c+d x)^2}-\frac {c (b c-2 a d)}{d^2 (b c-a d)^2 (c+d x)}+\frac {a^2 \log (a+b x)}{(b c-a d)^3}-\frac {a^2 \log (c+d x)}{(b c-a d)^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 99, normalized size = 0.99 \begin {gather*} \frac {c (b c-a d) (b c (c+2 d x)-a d (3 c+4 d x))-2 a^2 d^2 (c+d x)^2 \log (a+b x)+2 a^2 d^2 (c+d x)^2 \log (c+d x)}{2 d^2 (-b c+a d)^3 (c+d x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 99, normalized size = 0.99
method | result | size |
default | \(-\frac {a^{2} \ln \left (b x +a \right )}{\left (a d -b c \right )^{3}}+\frac {a^{2} \ln \left (d x +c \right )}{\left (a d -b c \right )^{3}}-\frac {c^{2}}{2 d^{2} \left (a d -b c \right ) \left (d x +c \right )^{2}}+\frac {c \left (2 a d -b c \right )}{\left (a d -b c \right )^{2} d^{2} \left (d x +c \right )}\) | \(99\) |
norman | \(\frac {\frac {c \left (2 a d -b c \right ) x}{d \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}+\frac {\left (3 a d -b c \right ) c^{2}}{2 d^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}}{\left (d x +c \right )^{2}}+\frac {a^{2} \ln \left (d x +c \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}-\frac {a^{2} \ln \left (b x +a \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}\) | \(186\) |
risch | \(\frac {\frac {c \left (2 a d -b c \right ) x}{d \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}+\frac {\left (3 a d -b c \right ) c^{2}}{2 d^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}}{\left (d x +c \right )^{2}}+\frac {a^{2} \ln \left (-d x -c \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}-\frac {a^{2} \ln \left (b x +a \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}\) | \(189\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 225 vs.
\(2 (98) = 196\).
time = 0.30, size = 225, normalized size = 2.25 \begin {gather*} \frac {a^{2} \log \left (b x + a\right )}{b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}} - \frac {a^{2} \log \left (d x + c\right )}{b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}} - \frac {b c^{3} - 3 \, a c^{2} d + 2 \, {\left (b c^{2} d - 2 \, a c d^{2}\right )} x}{2 \, {\left (b^{2} c^{4} d^{2} - 2 \, a b c^{3} d^{3} + a^{2} c^{2} d^{4} + {\left (b^{2} c^{2} d^{4} - 2 \, a b c d^{5} + a^{2} d^{6}\right )} x^{2} + 2 \, {\left (b^{2} c^{3} d^{3} - 2 \, a b c^{2} d^{4} + a^{2} c d^{5}\right )} x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 278 vs.
\(2 (98) = 196\).
time = 0.60, size = 278, normalized size = 2.78 \begin {gather*} -\frac {b^{2} c^{4} - 4 \, a b c^{3} d + 3 \, a^{2} c^{2} d^{2} + 2 \, {\left (b^{2} c^{3} d - 3 \, a b c^{2} d^{2} + 2 \, a^{2} c d^{3}\right )} x - 2 \, {\left (a^{2} d^{4} x^{2} + 2 \, a^{2} c d^{3} x + a^{2} c^{2} d^{2}\right )} \log \left (b x + a\right ) + 2 \, {\left (a^{2} d^{4} x^{2} + 2 \, a^{2} c d^{3} x + a^{2} c^{2} d^{2}\right )} \log \left (d x + c\right )}{2 \, {\left (b^{3} c^{5} d^{2} - 3 \, a b^{2} c^{4} d^{3} + 3 \, a^{2} b c^{3} d^{4} - a^{3} c^{2} d^{5} + {\left (b^{3} c^{3} d^{4} - 3 \, a b^{2} c^{2} d^{5} + 3 \, a^{2} b c d^{6} - a^{3} d^{7}\right )} x^{2} + 2 \, {\left (b^{3} c^{4} d^{3} - 3 \, a b^{2} c^{3} d^{4} + 3 \, a^{2} b c^{2} d^{5} - a^{3} c d^{6}\right )} x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 408 vs.
\(2 (85) = 170\).
time = 0.61, size = 408, normalized size = 4.08 \begin {gather*} \frac {a^{2} \log {\left (x + \frac {- \frac {a^{6} d^{4}}{\left (a d - b c\right )^{3}} + \frac {4 a^{5} b c d^{3}}{\left (a d - b c\right )^{3}} - \frac {6 a^{4} b^{2} c^{2} d^{2}}{\left (a d - b c\right )^{3}} + \frac {4 a^{3} b^{3} c^{3} d}{\left (a d - b c\right )^{3}} + a^{3} d - \frac {a^{2} b^{4} c^{4}}{\left (a d - b c\right )^{3}} + a^{2} b c}{2 a^{2} b d} \right )}}{\left (a d - b c\right )^{3}} - \frac {a^{2} \log {\left (x + \frac {\frac {a^{6} d^{4}}{\left (a d - b c\right )^{3}} - \frac {4 a^{5} b c d^{3}}{\left (a d - b c\right )^{3}} + \frac {6 a^{4} b^{2} c^{2} d^{2}}{\left (a d - b c\right )^{3}} - \frac {4 a^{3} b^{3} c^{3} d}{\left (a d - b c\right )^{3}} + a^{3} d + \frac {a^{2} b^{4} c^{4}}{\left (a d - b c\right )^{3}} + a^{2} b c}{2 a^{2} b d} \right )}}{\left (a d - b c\right )^{3}} + \frac {3 a c^{2} d - b c^{3} + x \left (4 a c d^{2} - 2 b c^{2} d\right )}{2 a^{2} c^{2} d^{4} - 4 a b c^{3} d^{3} + 2 b^{2} c^{4} d^{2} + x^{2} \cdot \left (2 a^{2} d^{6} - 4 a b c d^{5} + 2 b^{2} c^{2} d^{4}\right ) + x \left (4 a^{2} c d^{5} - 8 a b c^{2} d^{4} + 4 b^{2} c^{3} d^{3}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.79, size = 188, normalized size = 1.88 \begin {gather*} \frac {a^{2} b \log \left ({\left | b x + a \right |}\right )}{b^{4} c^{3} - 3 \, a b^{3} c^{2} d + 3 \, a^{2} b^{2} c d^{2} - a^{3} b d^{3}} - \frac {a^{2} d \log \left ({\left | d x + c \right |}\right )}{b^{3} c^{3} d - 3 \, a b^{2} c^{2} d^{2} + 3 \, a^{2} b c d^{3} - a^{3} d^{4}} - \frac {b^{2} c^{4} - 4 \, a b c^{3} d + 3 \, a^{2} c^{2} d^{2} + 2 \, {\left (b^{2} c^{3} d - 3 \, a b c^{2} d^{2} + 2 \, a^{2} c d^{3}\right )} x}{2 \, {\left (b c - a d\right )}^{3} {\left (d x + c\right )}^{2} d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.44, size = 198, normalized size = 1.98 \begin {gather*} \frac {\frac {c^2\,\left (3\,a\,d-b\,c\right )}{2\,d^2\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}+\frac {c\,x\,\left (2\,a\,d-b\,c\right )}{d\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}}{c^2+2\,c\,d\,x+d^2\,x^2}-\frac {2\,a^2\,\mathrm {atanh}\left (\frac {a^3\,d^3-a^2\,b\,c\,d^2-a\,b^2\,c^2\,d+b^3\,c^3}{{\left (a\,d-b\,c\right )}^3}+\frac {2\,b\,d\,x\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}{{\left (a\,d-b\,c\right )}^3}\right )}{{\left (a\,d-b\,c\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________